/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package vn.webapp.model;

import java.io.Serializable;
import javax.persistence.AssociationOverride;
import javax.persistence.AssociationOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 *
 * @author Tonytran
 */
@Entity
@Table(name = "teachers")
//@AssociationOverrides({@AssociationOverride(name = "teachers",joinColumns = @JoinColumn(name = "id")) })
public class Teachers implements Serializable
{
    
    @Id
    @GeneratedValue
    @Column(name = "teacher_id")
    private int teacher_id;
    
    @Column(name = "name")
    private String name;
    
    @Column(name = "email")
    private String email;

//    @OneToOne(fetch=FetchType.LAZY, cascade=CascadeType.ALL)
//    @JoinColumn(name="teacher_id")
//    private Teachers teachersdetail;
    
    public int getTeacher_id() {
        return teacher_id;
    }

    public void setTeacher_id(int teacher_id) {
        this.teacher_id = teacher_id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

//    public Teachers getTeachersdetail() {
//        return teachersdetail;
//    }
//
//    public void setTeachersdetail(Teachers teachersdetail) {
//        this.teachersdetail = teachersdetail;
//    }

}
